public class SaveScript : DynamicSaveCompAbs
{
    public float speed;

    public override SerializableDic<string, object> SaveData()
    {
        SerializableDic<string, object> saveData = new SerializableDic<string, object>();
        saveData.Add("speed", speed);
        return saveData;
    }

    public override void LoadData(SerializableDic<string, object> data)
    {
        if (data != null)
        {
            if (data.ContainsKey("speed"))
            {
                speed = (float)((double)data["speed"]);
            }
        }
    }
}